#include <iostream>
using namespace std;

class Item{
public:
    Item() = default;
    Item& operator=(const Item& item){
        cout << "copy assign Item" << endl;
    }
};

class A{
public:
    int* p_val;
    Item item[3]; // 默认拷贝赋值函数可以逐一拷贝数组内的元素，包括类和原生类型
public:
    A(){
        p_val = new int;
        *p_val = 0;
    }
};

int main(){
    A a1;
    A a2;
    a1 = a2;

    return 0;
}
